package com.nie.orderfood.service;

import com.nie.orderfood.DTO.CartDTO;
import com.nie.orderfood.entity.ProductInfo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface ProductInfoService {
    List<ProductInfo> findAllUp();

    ProductInfo findByProductId(String id);

    ProductInfo save(ProductInfo productInfo);

    Page<ProductInfo> findAll(Pageable pageable);

    //扣库存
    void decreaseStock(List<CartDTO> cartDTOList);
    //加库存
    void increaseStock(List<CartDTO> cartDTOList);
}
